package com.squirrel.common.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * Video 视频实体类
 * </p>
 *
 * @author 关远键
 * @since 2021/11/11 16:06
 */
@Data
@TableName("video")
@ApiModel(value = "视频", description = "")
public class Video extends Model<Video> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("视频id")
    @TableId(value = "video_id", type = IdType.AUTO)
    private Integer videoId;

    @ApiModelProperty("视频标题")
    @TableField("video_title")
    private String videoTitle;

    @ApiModelProperty("视频简介")
    @TableField("video_intro")
    private String videoIntro;

    @ApiModelProperty("视频上传时间")
    @TableField("video_upload_time")
    private LocalDateTime videoUploadTime;

    @ApiModelProperty("上传视频的用户id")
    @TableField("video_from")
    private Integer videoFrom;

    @ApiModelProperty("视频地址")
    @TableField("video_address")
    private String videoAddress;

    @ApiModelProperty("视频归属频道")
    @TableField("video_channel")
    private Integer videoChannel;

    @ApiModelProperty("视频被观看次数")
    @TableField("video_watch_number")
    private Integer videoWatchNumber;

    @ApiModelProperty("视频封面图片地址")
    @TableField("video_image")
    private String videoImage;

    @Override
    public Serializable pkVal() {
        return this.videoId;
    }

}
